﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            A();
            B();
            C();
        }
        static void A()
        {
            MianJi mianJi = new MianJi();
            Console.WriteLine("圆的面积为{0}",mianJi.S(3.14,2));
            Console.WriteLine("长方形的面积为{0}",mianJi.S(4,2) );
        }
        static void B()
        {
            SumUtils sumUtils = new SumUtils();
            Console.WriteLine("两个整数相加为{0}",sumUtils.Sum(2,2));
            Console.WriteLine("两个小数相加为{0}",sumUtils.Sum(1.2,2.3));
            Console.WriteLine("两个字符串相加{0}",sumUtils.Sum("dwqw","sjd"));
            Console.WriteLine("请输入一个整数：");
            int b = 0;
            sumUtils.Sum(b);
            b = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("1~"+b+ "的和为："+sumUtils.Sum(b));
            Console.ReadKey();
            
        }
        static void C()
        {
            Console.WriteLine("按确定");
            Console.ReadKey();
            YuanGong yuanGong = new YuanGong("124","张三","软件");
            yuanGong.Write();

        }
    }
}
